package com.xuyanze.es;


import com.xuyanze.es.utils.LambdaUtils;
import com.xuyanze.es.utils.PropertyNamer;
import com.xuyanze.es.utils.SerializedLambda;

/**
 * @author ：lzy
 * @date ：2023-01-12
 * @description：
 */
public abstract class EsAbstractLambdaWrapper<T,Children extends EsAbstractLambdaWrapper<T,Children>>
    extends EsAbstractWrapper<T,SerializableFunction<T,?>,Children> {

    @Override
    public String fieldToString(SerializableFunction<T,?> sFunction) {
        SerializedLambda resolve = LambdaUtils.resolve(sFunction);
        return PropertyNamer.methodToProperty(resolve.getImplMethodName());
    }

}
